using System;
using System.Collections.Generic;

namespace B.S.Data.MES.API.Dto.InvoiceDTO
{
    /// <summary>
    /// 销售发票数据传输对象
    /// 用于前端展示和数据传输
    /// </summary>
    public class SalesInvoiceDTO
    {
        /// <summary>
        /// 发票主键ID
        /// </summary>
        public int InvoiceId { get; set; }

        /// <summary>
        /// 发票编号
        /// </summary>
        public string InvoiceNo { get; set; }

        /// <summary>
        /// 关联的订单ID
        /// </summary>
        public int OrderId { get; set; }

        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }

        /// <summary>
        /// 客户ID
        /// </summary>
        public int CustomerId { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string CustomerName { get; set; }

        /// <summary>
        /// 发票金额
        /// </summary>
        public decimal InvoiceAmount { get; set; }

        /// <summary>
        /// 开票日期
        /// </summary>
        public DateTime InvoiceDate { get; set; }

        /// <summary>
        /// 发票类型
        /// </summary>
        public string InvoiceType { get; set; }

        /// <summary>
        /// 发票状态
        /// 0：待开具，1：已开具，2：已作废，3：已红冲
        /// </summary>
        public int InvoiceStatus { get; set; }

        /// <summary>
        /// 发票状态名称
        /// </summary>
        public string InvoiceStatusName { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        public decimal TaxRate { get; set; }

        /// <summary>
        /// 税额
        /// </summary>
        public decimal TaxAmount { get; set; }

        /// <summary>
        /// 不含税金额
        /// </summary>
        public decimal SubtotalAmount { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        public string Remarks { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        public string? UpdateName { get; set; }

        /// <summary>
        /// 发票明细列表
        /// 包含当前发票的所有商品明细信息
        /// </summary>
        public List<SalesInvoiceDetailDTO> Details { get; set; }
    }
}